load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_library(
    name = "location",
    srcs = [
        "GnssClient.cpp",
        "GpxParser.cpp",
        "KmlParser.cpp",
        "StringParse.cpp",
    ],
    hdrs = [
        "GnssClient.h",
        "GpsFix.h",
        "GpxParser.h",
        "KmlParser.h",
        "StringParse.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:result",
        "//cuttlefish/host/commands/gnss_grpc_proxy:libcvd_gnss_grpc_proxy",
        "//libbase",
        "@grpc//:grpc",
        "@grpc//:grpc++",
        "@grpc//:grpc++_reflection",
        "@jsoncpp",
        "@libxml2//:libxml2",
        "@protobuf",
    ],
    # `layering_check` conflicts with the combination of the clang prebuilt and
    # the cmake build rules used for @libxml2.
    features = ["-layering_check"],
)

# TODO: 403655105 - revisit `vsscanf` clang-tidy warning in `StringParse.cpp`
#clang_tidy_test(
#    name = "location_clang_tidy",
#    srcs = [":location"],
#    tags = ["clang_tidy", "clang-tidy"],
#)
